package
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class ScreenAreYouSure extends Screen
	{
		
		private var skin:mcScreenAreYouSureSkin;
		private var player:Player;
		
		public function ScreenAreYouSure(p:Player)
		{
			
			super();
			player = p;
			
		}
		
		override public function init():void
		{
			
			destroy();
			skin = new mcScreenAreYouSureSkin();
			addChild(skin);
			skin.btnPlay2.addEventListener(MouseEvent.CLICK, btnPlay2);
			skin.btnQuit2.addEventListener(MouseEvent.CLICK, btnQuit2);
			
		}
		
		private function btnPlay2(e:MouseEvent):void
		{
			
			var hasPlayedBefore:Boolean = player.account.data != null ? true : false;
			
				if (hasPlayedBefore)
				{
					
					gotoAndStop("MainCentral");
					
				} else {
					
					gotoAndStop("CharCreation");
					
				}
			
		}
		
		private function btnQuit2(e:MouseEvent):void
		{
			
			gotoAndStop("Home");
		}
	}
}